

#region Using Statements

using System;
using System.Collections.Generic;
using System.Linq;

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;

using Freeform;

#endregion


namespace Client
{
    /// <summary>
    /// This is the main type for your game
    /// </summary>
    public class Game : Freeform.Game
    {

        #region Program Entry Point

        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        static void Main(string[] args) { using (Game game = new Game()) { game.Run(); } }

        #endregion


        #region Members

        #endregion


        #region Init

        /// <summary>
        /// Creates a new Game instance.
        /// </summary>
        public Game() : base(new Vector2(1024, 768), false) { }


        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            base.Initialize();

            IsMouseVisible = true;
            Window.AllowUserResizing = false;
            Window.Title = "IsoTurr";

            // Create background and main menu screens.
            new Background(this);
            new MainMenu(this);
        }

        #endregion


        #region Update

        /// <summary>
        /// Allows the game to run logic such as updating the world,
        /// checking for collisions, gathering input, and playing audio.
        /// </summary>
        /// <param name="gameTime">Provides a snapshot of timing values.</param>
        protected override void Update(GameTime gameTime)
        {
            // Allows the game to exit
            if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed)
                this.Exit();

            // TODO: Add your update logic here

            base.Update(gameTime);
        }

        #endregion

    }
}
